package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 图书对象 sys_book
 *
 * @author caiJin
 * @date 2024-04-26
 */

@Data
@ApiModel(value = "图书对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_book")
public class SysBook  {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 名字
     */
    @Excel(name = "名字")
    @ApiModelProperty(value = "名字")
    private String name;
    /**
     * 作者
     */
    @Excel(name = "作者")
    @ApiModelProperty(value = "作者")
    private String author;
    /**
     * 图片
     */
    @Excel(name = "图片")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "图片")
    private String picture;
    /**
     * 发布时间
     */
    @Excel(name = "发布时间")
    @ApiModelProperty(value = "发布时间")
    private LocalDate publishDate;
    /**
     * 分类
     */
    @Excel(name = "分类")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "分类")
    private Long classId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;
}
